/*
	File:	Util.cpp
	Author:	TJ Ashby
	Comments:
		Methods to help with redundant tasks
*/

#include "Util.h"


int Util::ParseInt( String AsciiValues )
{
	return atoi(AsciiValues);
}

double Util::ParseDouble( String AsciiValues )
{
	return atof(AsciiValues);
}

void Util::CopyToVRam( VertexBuffer VertBuff,void *pData,int Size )
{
	void *vram;
	
	VertBuff->Lock(0,0,&vram,0);
	memcpy(vram,pData,Size);
	VertBuff->Unlock();
}

void Util::CopyToVRam( IndexBuffer IndexBuff,void *pData,int Size )
{
	void *vram;

	IndexBuff->Lock(0,0,&vram,0);
	memcpy(vram,pData,Size);
	IndexBuff->Unlock();
}
